<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>测试JQUERY-3委托事件</title>
<link  type="text/css" rel="stylesheet" href="../static/componet/bootstrap/3.3.5/css/bootstrap.min.css">
<script type="text/javascript" src="../static/componet/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../static/componet/jquery/jquery-3.2.1.min.js"></script>
</head>
<body>
   <div>
   	   <button id="t_add_bu" >增加</button>
   </div>
   <table id="t_table" class="table table-bordered table-hover" style="width: 500px;height: 200px;">
   	   <thead>
   	      <tr>
   	         <th>标识</th>
   	         <th>名称</th>
   	      </tr>
   	   </thead>
   	   <tbody>
           <tr><td>0</td><td>test</td></tr>
   	   </tbody>
   </table>
</body>
<script type="text/javascript">
	$(function(){
		$("#t_add_bu").on("click",function(){
			$("#t_table tbody").empty();
			$("#t_table tbody").append("<tr><td>1</td><td>test1</td></tr>");
			$("#t_table tbody").append("<tr><td>2</td><td>test2</td></tr>");
		});
		$("#t_table tbody").on("click","tr",function(){
			alert($(this).find("td:eq(1)").text());
		});
	});
</script>
</html>